
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:nft_shop/my/page/set/my_authentication_page.dart';
import 'package:nft_shop/my/page/set/payment_account_page.dart';
import 'package:nft_shop/res/global.dart';
import 'package:nft_shop/widgets/my_button.dart';
//提示
class AlbumHintDialog extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final Widget content = Container(
      padding: EdgeInsets.only(top: 28, bottom: 34, left: 30, right: 30),
      width: Get.width - 40,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(10),
        color: Colors.white,
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.min,
        children: [
          Center(
              child: Text(
                "温馨提示",
                style: TextStyle(
                    fontSize: 14,
                    fontFamily: "PingFangSC-Semibold",
                    color: Color(0xFF222222)),
              ),),
          SizedBox(
            height: 10,
          ),
          Center(
            child: Text(
              "您还没有专辑,前去创建",
              style: TextStyle(
                  fontSize: 14,
                  color: Color(0xFF666666),
                  fontFamily: "PingFangSC-Semibold"),
            ),
          ),
          SizedBox(
            height: 30,
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              Container(
                width: 125,
                height: 40,
                child: MyButton(
                  onPressed: () {
                    Get.back();
                  },
                  text: "取消",
                  radius: 7,
                  fontSize: 16,
                  textColor: Global.kTheme.textPrimary4,
                  backgroundColor: Color(0xFFEFEFEF),
                ),
              ),
              Container(
                width: 125,
                height: 40,
                child: MyButton(
                  onPressed: () async{
                    Navigator.of(Get.context!)..pop()..pop();
                  },
                  text: "立即前往",
                  radius: 7,
                  fontSize: 16,
                  textColor: Colors.white,
                  backgroundColor: Global.kTheme.colorBackground3,
                ),
              )
            ],
          )
        ],
      ),
    );

    final Widget body = MediaQuery.removeViewInsets(
      removeLeft: true,
      removeTop: true,
      removeRight: true,
      removeBottom: true,
      context: context,
      child: Center(
        child: content,
      ),
    );

    return Scaffold(
      backgroundColor: Colors.transparent, //透明类型
      body: body,
    );
  }
}

//实名提示
class AuthenticationDialog extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final Widget content = Container(
      padding: EdgeInsets.only(top: 28, bottom: 34, left: 30, right: 30),
      width: Get.width - 40,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(10),
        color: Colors.white,
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.min,
        children: [
          Center(
            child: Text(
              "温馨提示",
              style: TextStyle(
                  fontSize: 14,
                  fontFamily: "PingFangSC-Semibold",
                  color: Color(0xFF222222)),
            ),),
          SizedBox(
            height: 10,
          ),
          Center(
            child: Text(
              "您还没有实名认证，前去认证",
              style: TextStyle(
                  fontSize: 14,
                  color: Color(0xFF666666),
                  fontFamily: "PingFangSC-Semibold"),
            ),
          ),
          SizedBox(
            height: 30,
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              Container(
                width: 125,
                height: 40,
                child: MyButton(
                  onPressed: () {
                    Get.back();
                  },
                  text: "取消",
                  radius: 7,
                  fontSize: 16,
                  textColor: Global.kTheme.textPrimary4,
                  backgroundColor: Color(0xFFEFEFEF),
                ),
              ),
              Container(
                width: 125,
                height: 40,
                child: MyButton(
                  onPressed: () async{
                    Get.back();
                    Get.to(MyAuthenticationPage());
                  },
                  text: "去认证",
                  radius: 7,
                  fontSize: 16,
                  textColor: Colors.white,
                  backgroundColor: Global.kTheme.colorBackground3,
                ),
              )
            ],
          )
        ],
      ),
    );

    final Widget body = MediaQuery.removeViewInsets(
      removeLeft: true,
      removeTop: true,
      removeRight: true,
      removeBottom: true,
      context: context,
      child: Center(
        child: content,
      ),
    );

    return Scaffold(
      backgroundColor: Colors.transparent, //透明类型
      body: body,
    );
  }
}

//收款提示
class CollectionDialog extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final Widget content = Container(
      padding: EdgeInsets.only(top: 28, bottom: 34, left: 30, right: 30),
      width: Get.width - 40,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(10),
        color: Colors.white,
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.min,
        children: [
          Center(
            child: Text(
              "温馨提示",
              style: TextStyle(
                  fontSize: 14,
                  fontFamily: "PingFangSC-Semibold",
                  color: Color(0xFF222222)),
            ),),
          SizedBox(
            height: 10,
          ),
          Center(
            child: Text(
              "您还没有设置收款账号,前去设置",
              style: TextStyle(
                  fontSize: 14,
                  color: Color(0xFF666666),
                  fontFamily: "PingFangSC-Semibold"),
            ),
          ),
          SizedBox(
            height: 30,
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              Container(
                width: 125,
                height: 40,
                child: MyButton(
                  onPressed: () {
                    Get.back();
                  },
                  text: "取消",
                  radius: 7,
                  fontSize: 16,
                  textColor: Global.kTheme.textPrimary4,
                  backgroundColor: Color(0xFFEFEFEF),
                ),
              ),
              Container(
                width: 125,
                height: 40,
                child: MyButton(
                  onPressed: () async{
                    Get.back();
                    Get.to(PaymentAccountPage());
                  },
                  text: "立即前往",
                  radius: 7,
                  fontSize: 16,
                  textColor: Colors.white,
                  backgroundColor: Global.kTheme.colorBackground3,
                ),
              )
            ],
          )
        ],
      ),
    );

    final Widget body = MediaQuery.removeViewInsets(
      removeLeft: true,
      removeTop: true,
      removeRight: true,
      removeBottom: true,
      context: context,
      child: Center(
        child: content,
      ),
    );

    return Scaffold(
      backgroundColor: Colors.transparent, //透明类型
      body: body,
    );
  }
}

